from ADT import Deque


def huiwen(s):
    deque = Deque()
    for i in s:
        deque.addFront(i)
    while deque.size() > 1:
        if deque.removeFront() != deque.removeRear():
            return False
    return True


s = input()
print(huiwen(s))
